Part Number Hot Search : 
TC74LC 000X1 62400 RC10S04G HDT62SR 030406 1S1834Z ALVT1628
Product Description
Full Text Search
 

To Download AN414 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  application note controlling a brush dc motor with an st6265 microcontroller j. nicolai, t. castagnet introduction variable speed drives have become widespread in the home appliance field. the most classical way to achieve it is to use an ac universal motor with triac and a specific circuit which controls the triac firing angle. we chose rather to use a permanent magnet dc motor driven by a chopper. the chopper is driven by a high frequency pwm signal. controlling the pwm duty cycle is equivalent to controlling the motor voltage, which in turn adjusts directly the motor speed. why did we make such a choice? - the main reason is the need of a speed sensor and a closed loop regulation for the universal motor. for the permanent magnet dc motor, the speed is almost proportional to the motor supply voltage. therefore it is sufficient to control the motor voltage (through duty cycle adjustment) if a 10% speed accuracy is sufficient. this saves the expensive speed sensor. - the dc motor with chopper has higher efficiency, as there are no 50hz copper and iron losses, due to lower current ripple. - the dc operation allows to reduce the acoustic noise, especially at 100hz. figure 1a. block diagram st6265 igbt dc motor vr01988h m AN414 / 11,93
figure 1b. ac universal motor versus permanent magnet dc motor: the dc motor has a lower current ripple and therefore higher efficiency and less t imotor imotor m m n l t di di vr01988a controlling a brush dc motor with an st6265 microcontroller 2/14
1 principle the drive is supplied from the rectified mains voltage, and consists of a chopper driven by a pwm signal generated by the st6265 microcontroller. the motor voltage control is achieved by measuring the rectified mains voltage with the analog-to-digital converter present on the st6265 mcu and adjusting the pwm signal duty cycle accordingly: the voltage seen by the motor is the product of the supply voltage by the pwm duty cycle. so the motor speed can be stable even if the mains voltage ripple is high, as the mcu corrects the duty cycle according to this ripple. this avoids the use of a speed measurement device and a speed regulation loop. if this voltage measurement / duty adjustment process is carried out often enough, it also results in reducing motor current ripple, and therefore copper and motor iron losses, thus improving motor efficiency. the ripple period being 10 milli-seconds (for 50 hz mains), the later process must occur at least every milli-second to get a large ripple reduction. in our example, the voltage compensation loop lasts 380 micro-seconds. this drive also implements a power limitation: the motor current is measured by the analog-to-digital converter of the st6265 mcu, and is used, together with the dc mains voltage, to compute the electrical power taken up by the motor. if it exceeds the maximum programmed power, the pwm signal duty cycle is reduced in real time by the st6265 to stay below this maximum. this limitation requires only a few discrete components used to measure the current (2 resistors, a diode and a capacitor make up a peak current detector), it is otherwise fully software. our application features a 300 watts maximum power, but this value can be easily adjusted by modifying a data table in the program, therefore allowing a very short design modification time if the drive must be used with various motors. 2 why use a microcontroller? the classical implementation of such a high frequency chopper usually involves an application-specific circuit, and some analog circuitry to implement the additional features such as voltage compensation, power limitation or other. at first look, a microcontroller should reduce the overall cost of the electronics, as a single chip would ideally replace several chips. the real world is not so simple: the st6265 outputs the pwm signal with a 5 volts level, so a buffer is needed to drive the igbt with 15 volts, which takes 2 or 3 signal transistors. the mcu must be supplied with a voltage between 3 and 6 volts, and the 15 volts must be generated, so we need a small auxiliary supply to extract 5 and 15 volts from the mains. in addition, the mcu cannot generally replace the fast transistor protection needed for the igbt, as its response time is in the range of 10 micro-seconds, while less than 1 micro-second is required. in conclusion, the mcu approach comes out at the same price, or slightly more expensive than the analog one, at least if we only account for components costs. we must, however, consider the overall system cost, not only the components cost of one function. controlling a brush dc motor with an st6265 microcontroller 3/14
three factors at least should be considered: 1- in many cases, the appliance driven by the motor includes some kind of user interface: buttons, potentiometers, led displays, even lcd displays. if the analog approach is used, more circuitry will be needed to interface them with the motor drive. with the st6265 mcu approach, the mcu itself can sense the buttons, potentiometers, drive leds... in some existing appliances, the analog approach is used in conjunction with a microcontroller, the latter being dedicated to the user interface. this is obviously a waste, as one st62 mcu could take care of both tasks. if we consider the case of lcd displays, which are becoming more and more popular, a dedicated lcd driver circuit is generally used to interface them to a micro. we have implemented a software lcd drive function in the st6265 mcu, using its free output pins; the st6265 mcu can at the same time run the motor, drive the lcd and sense the user speed demand (in our case, two buttons ofastero and oslowero). (cf. ref. [4] page 12). 2- time-to-market and design time must be considered: the st6265 mcu software contains all the characteristics of the application; it is much faster, if the application must be modified, to modify software than hardware especially when otp parts are used for volume production. we have implemented a software motor power limitation: the motor characteristics are known by the software in the form of a look up table. if the application must accommodate a different motor type, it is very quick to modify the data table in the software. most modifications of the application can be achieved by simple software modifications. if the st6265 mcu replaces an asic, the time and money saved when it is necessary to modify the initial design goes without saying. the st62 mcu can also be used to customize the application: to limit the stock inventory, several applications, for example a low-end and high-end vacuum cleaner can use the same electronics board, with the same mcu, but the mcus have different softwares, or the software is programmed into the st62t65 mcu (otp version of st6265) at the end of the board assembly line. 3- the mcu lets you do things that are not possible otherwise. simple examples are: - execute pre-programmed sequences of motor speeds, diagnostic faults and alert the user (with temperature sensors, speed sensors, ... or sometimes without them, by deducing motor speed from current, or temperature from cumulated current ...). - store in non-volatile memory (eeprom) user settings which must be saved when power is turned off. controlling a brush dc motor with an st6265 microcontroller 4/14
3 application description figure 2. permanent magnet dc motor control with st6265 mcu and igbt. mcu supply 15 v 5v buffer user interface ud vdd pwm peak current detector vss ic igbt 0v m vr01988b the power part of the hardware is a bridge rectifier, an input filter capacitor, and the chopper. this converter drives the permanent magnet dc motor. the chopper switch is an igbt. the control part of the hardware is made of the st6265 mcu, the user interface and the power interface. the latter is made of a low-power supply (5 volts for the mcu and 15 volts for the igbt gate), a level shifter to interface mcu and igbt, a peak current detector and a resistor bridge to measure the loop dc voltage, ud. the complete schematic with component values is shown in annex page 13 . controlling a brush dc motor with an st6265 microcontroller 5/14
3.1 what microcontroller to use? the mcu generates a 5 volts pwm signal which drives the igbt and permits to control the average voltage across the motor, and consequently the motor speed through duty cycle adjustment. on the mcu are also implemented software functions such as a line voltage compensation and a motor power limitation described later. in order to implement these functions, the mcu should include the following special features: - pwm timer: it must be autoreload to leave the cpu free for other tasks, and fast to obtain high switching frequencies. - analog-to-digital converter, necessary to measure the dc voltage and the motor current. - good noise immunity to withstand the chopper and brush sparks proximity. - a watchdog for safe operation we used the st6260 / st6265: it is a low-end 8-bits mcu with 20 pins (or 28 pins respectively), depending upon the i/o request of the user interface. figure 3. st6260/65 block diagram. an internal analog-to-digital converter and a fast pwm generator are the rom 4k watchdog spi ram 128 eeprom 128 pwm timer timer a/d converter port a port b port c 8 bit cpu timer a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa a aaa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa 8 bit data bus 20 or 28 pins packa ge vr01988c controlling a brush dc motor with an st6265 microcontroller 6/14
3.2 the pwm control the pwm feature is required to control the average voltage on the motor and therefore its speed. the autoreload timer of the st6265 is used to achieve the pwm control (cf. figure 4). - at each end of count, it reloads itself without cpu operation. the cpu is then available for other tasks after it has programmed the frequency and duty cycle of the pwm signal. - the duty cycle can be adjusted by software from 0 to 100%. the maximum frequency is: 31.25 khz with a resolution of 256 steps (0.4% resolution). for our application, we chose a frequency of 8 khz. figure 4. pwm timer operation. operation of the autoreload pwm timer: the cpu controls the period with the reload register, and the duty cycle with the compare register; the timer pwm output 255 compare t register 000 switching period duty cycle vr01988d controlling a brush dc motor with an st6265 microcontroller 7/14
3.3 the voltage compensation using such feature on a permanent magnet dc motor, the speed is kept almost constant by keeping the motor voltage constant even if the rectified mains voltage is strongly swinging across the filter capacitor. so a closed loop speed control is not necessary and the speed sensor is saved. a compensation feature is implemented in order to: - obtain a motor speed unsensitive to mains voltage variations (static performance), - reduce acoustic motor noise and dissipation by reducing the motor current ripple (dynamic performance). the average motor voltage vmot must be kept constant. the duty cycle d is modulated as a function of the direct voltage ud around a reference point given by: - user request duty cycle (d0), - nominal direct voltage (udnom). vmot d x ud vmot constant d0 x udnom to achieve this function, ud is measured using the a/d converter of the st6265 and quantized on 32 levels, and d0 is quantized on 16 levels. a duty cycle correction is picked up from a look-up table versus ud and d0. then the correction is added to d0 and the sum d is loaded in the pwm timer register. the table could also contain values chosen specifically for the application. in order to reduce motor current ripple, the control loop must be fast, so as to minimize the time between voltage reading and duty cycle updating. our compensation algorithm takes 380 micro-seconds, so in one ud ripple cycle (10 milliseconds for a 50hz line), the correction is made approximately 26 times. controlling a brush dc motor with an st6265 microcontroller 8/14
figure 5 shows results obtained for the static performance of the compensation: the motor voltage is measured while the dc input voltage varies from 100 to 400 volts. it is shown that the motor voltage remains within a 5 to 15% range of the voltage demand. this compensation is good enough for most home appliance applications. figure 5. voltage compensation static performances. the motor voltage (and therefore, motor speed) remains constant while the dc line voltage ud varies. so the motor voltage and the speed aa aa aa aa a aaa a aaa aa aa aa aa aa aa aa aa a aaa a aaa aa aa aa aa aa aa aa aa a aaa a aaa 0 50 100 150 200 250 100 200 300 400 500 v motor (v) ud (v) d vmotor < 10% vr01988e figure 6 shows the dynamic performance of the compensation: the 100 hz ripple in motor current is considerably reduced when using the compensation (lower trace), compared to the ripple without compensation (upper trace). the measurement is made with a loaded motor: imotor = 2.5 amps (average) / vmotor = 105 volts. the mains voltage is 230 volts. figure 6. voltage compensation dynamic performance: motor current ripple reduction (1a/div, 2ms/div). the top trace shows the motor current without compensation. the bottom trace shows a significant imotor av = 2.5 amps ; vmotor = 105 v uac = 230 v ; c = 100 m f 2 ms/dv ; 1 a/dv 0 amps -- 0 amps -- d i = 2 amp d i = 1 amp vr01988f controlling a brush dc motor with an st6265 microcontroller 9/14
3.4 the motor power limitation the purpose of the power limitation is to keep the motor within its safe operating area in case of excessive loading (avoid overheating and hard brush switching). the motor current is evaluated every 3 milli-seconds by measuring the peak chopped current in the igbt emitter. if we call d the duty cycle of the pwm signal, ud the motor dc supply voltage and imot the average current in the motor, the electrical power fed to the motor is: p vmot x imot d x ud x imot if we want to limit p to a maximum value pmax (300 w in our example), we must keep the duty cycle below a maximum duty cycle od_maxo: d   d max with d max pmax ud x imot the program repetitively measures imot and ud using the a/d converter of the st6265. then it extracts d_max from a table addressed by ud and imot. it then compares d to d_max and decreases d if it is larger than d_max. the power limitation presents osmootho transitions between olimitedo condition and onon limitedo condition, in order to avoid oscillations or jerks. figure 7 shows the measured performance of the power limitation. to modify the power limit target, the look-up table can easily be modified. figure 7. motor power limitation performance. when the motor load changes, the motor current varies. the st6265 mcu measures this current and limits the motor voltage if necessary. software-limited motor voltage (left scale) and electrical power (right 100 200 300 400 500 100 150 200 250 vmotor imotor (a) power 0 50 0 0123456 vmotor (v) power (w) vr01988g controlling a brush dc motor with an st6265 microcontroller 10/14
3.5 some program highlights the total program takes 400 bytes of memory space, plus 1024 bytes for the tables. one timer remains free, and 2500 bytes remain available on the st6260 or st6265 for additional software or enlargement of the look-up tables. it is possible, for example, to drive an lcd display by software, to execute pre-programmed sequences of motor speeds, current limitations, ... the eeprom also remains available, for example to store user adjustments which must be saved when the power is off. the line voltage compensation algorithm must be executed at high speed, as already explained, while the power limitation algorithm can be executed less often. therefore, the complete program executes seven line compensations for each power limitation. the line voltage is compensated every 380 micro-seconds while the power is sensed and limited only every 3 milliseconds. 4 conclusion microcontrollers are often limited to controlling and monitoring the user interfaces. this paper describes a digital solution based on a general purpose mcu with on-chip pwm generator, the st6265. besides the user interface such as an lcd drive, the mcu controls directly a dc motor with few external components and sophisticated control. a simple instruction set and the use of look-up tables allow for a short time-to-market, while avoiding the investment into an asic circuit. the demonstrated concept is applicable to home appliances (food processor, washing machine, refrigerator, hvac ...) and to industrial applications where high speed accuracy is not required (pumps, fans ...). controlling a brush dc motor with an st6265 microcontroller 11/14
5 references [1] - microcontroller and triac on 120/230v mains a.n 392/a - ph. rabier and l. perier (sgs-thomson microelectronics) [2] - design with microcontroillers in noisy environment a.n 435 - l. perier (sgs-thomson microelectronics) [3] - versatile and cost-effective induction motor drive with digital three phase generation a.n 424 - b. maurice, jm. bourgeois, b. saby (sgs-thomson microelectronics) [4] - direct software lcd drive with st621x and st626x a.n 594 - t. castagnet, j. nicolai, n. michel (sgs-thomson microelectronics) controlling a brush dc motor with an st6265 microcontroller 12/14
annex: permanent magnet motor drive complete schematic d4 5.1v c7 47n c4 200uf vcc 11 vss 12 pb0 1 pb1 2 tst/vpp 3 pb2 4 pb3 5 pb4 6 pb5 7 pb6/tim21 8 pb7/tim20 9 xtal 20 extal 21 nres 22 ckout 23 pc1/tim1 27 pa0 10 pa1 13 pa2 14 pa3 15 pa4 16 pa5 17 pa6 18 pa7 19 pc4 24 pc3 25 pc2 26 pc0 28 u1 st6265 t4 bc327 r20 2.2k d3 13v p4 p3 p2 d6 4x3a 600v c8 100nf d5 stta806di c1 100u380v r2 270k c3 100uf r19 15k c9 27pf c10 27pf r9 10k x1 8mhz r12 3.9k r13 3.9k d7 led d8 led sw1 sw2 r7 100 r1 6.8k r16 1k d2 1n4148 c6 1nf t1 bc337 t2 2n2222a d1 1n4148 r5 22k r6 47k r4 4.7k r15 8.2k r3 220 c5 100nf t3 stgp10n50 d10 byt11-600 r10 0.47/3w p1 f1 3a r11 0.47/2w r18 12k/2w r17 12k/2w vr01988 controlling a brush dc motor with an st6265 microcontroller 13/14
notes : information furnished is believed to be accurate and reliable. however, sgs-thomson microelectronics assumes no responsability for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of sgs-thomson microelectronics. specifications mentioned in this publication are subject to change without notice. this publication supersedes and replaces all information previously supplied. sgs-thomson microelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of sgs-thomson microelectronics. ? 1994 sgs-thomson microelectronics - all rights reserved purchase of i 2 c components by sgs-thomson microelectronics, conveys a license under the philips i 2 c patent. rights to use these components in an i 2 c system, is granted provided that the system conforms to the i 2 c standard specifications as defined by philips. sgs-thomson microelectronics group of companies australia - brazil - france - germany - hong kong - italy - japan - korea - malaysia - malta - morocco the netherlands - singapore - spain - sweden - switzerland - taiwan - thailand - united kingdom - u.s.a. controlling a brush dc motor with an st6265 microcontroller 14/14


▲Up To Search▲   

 
Price & Availability of AN414

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X